import { eagleRequest } from "@/utils/request";

export default class EagleApi {
    /**
     * * 分页获取多条历史会话
     * * @param params 分页参数
    */
    public apiGetHistorySessions(params: any) {
			return eagleRequest({
				url: "/history_sessions",
				method: "GET",
				params
			});
    }

		/**
		 * 删除历史会话
		*/
		public apiDeleteHistorySessions() {
			return eagleRequest({
				url: "/history_sessions",
				method: "DELETE"
			});
		}

		/**
		 * 获取用户日志
		*/
		public apiGetUserLogs(params: any) {
			return eagleRequest({
				url: "/login_actions",
				method: "GET",
				params
			});
		}
	
		/**
		 * 获取终端日志
		*/
		public apiGetTerminalLogs(params: any) {
			return eagleRequest({
				url: "/admin_actions",
				method: "GET",
				params,
			});
		}

		/**
		 * 获取日志保留和备份时间
		 */
		 public apiGetLogCycle(params: any) {
			return eagleRequest({
				url: "/eagle_settings",
				method: "GET",
				params,
			});
		}

		 public apiPatchLogCycle(data: any) {
			return eagleRequest({
				url: "/eagle_settings",
				method: "patch",
				data
			});
		}
}